package com.lihang.system.service.impl;

import com.lihang.common.vo.StudentVo;
import com.lihang.system.dto.request.StudentRequest;
import com.lihang.system.entity.Student;
import com.lihang.system.mapper.StudentMapper;
import com.lihang.system.service.IStudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 学生表 服务实现类
 * </p>
 *
 * @author lihang
 * @since 2023-04-15
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<StudentVo> queryStudents(String name) {
        List<StudentVo> list = studentMapper.queryStudents(name);
        return list;
    }

    @Override
    public List<StudentVo> queryStudentList(StudentRequest param) {
        List<StudentVo> list = studentMapper.queryStudentList(param);
        return list;
    }

    @Override
    public Student queryStudentById(Integer stuId) {
        Student student = studentMapper.queryStudentById(stuId);
        return student;
    }

    @Override
    public Student queryById(Integer stuId) {
        Student student = studentMapper.queryById(stuId);
        return student;
    }

    @Override
    public List<Student> queryByRoomId(String dorNum, Integer stuId) {
        List<Student> students = studentMapper.queryByRoomId(dorNum, stuId);
        return students;
    }

    @Override
    public List<StudentVo> aaksjdh(Integer stuId) {
        List<Student> students = studentMapper.asdadas(stuId);
        return null;
    }
}
